{extend name="layout" /}
{block name="title"}存储方式{/block}
{block name="content"}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">存储方式</div>
                <div class="layui-card-body" pad15>
                    <div class="layui-form" wid100 lay-filter="">
                        <div class="layui-form-item">
                            <label class="layui-form-label">平台</label>
                            <div class="layui-input-block">
                                <input type="radio" name="type" value="1" title="阿里云OSS" {$value.type== '1' ?
                                'checked=""' : ''} lay-filter="type">
                                <input type="radio" name="type" value="2" title="腾讯云对象存储" {$value.type== '2' ?
                                'checked=""' : ''} lay-filter="type">
                                <input type="radio" name="type" value="3" title="百度云对象存储" {$value.type== '3' ?
                                'checked=""' : ''} lay-filter="type">
                                <input type="radio" name="type" value="4" title="七牛云对象存储" {$value.type== '4' ?
                                'checked=""' : ''} lay-filter="type">
                            </div>
                        </div>
                        <div class="layui-form-item type1">
                            <label class="layui-form-label">Access Key ID</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss[accessKeyId]" value="{$value.oss.accessKeyId|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type1">
                            <label class="layui-form-label">Access Key Secret</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss[accessKeySecret]"
                                       value="{$value.oss.accessKeySecret|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type1">
                            <label class="layui-form-label">EndPoint(外网)</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss[endpoint]" value="{$value.oss.endpoint|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type1">
                            <label class="layui-form-label">Bucket(存储桶名称)</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss[bucket]" value="{$value.oss.bucket|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type1">
                            <label class="layui-form-label">Bucket域名(外网)</label>
                            <div class="layui-input-block">
                                <input type="text" name="oss[bucket_url]" value="{$value.oss.bucket_url|default=''}"
                                       class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item type2">
                            <label class="layui-form-label">腾讯云APPID</label>
                            <div class="layui-input-block">
                                <input type="text" name="cos[appId]" value="{$value.cos.appId|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type2">
                            <label class="layui-form-label">腾讯云SecretID</label>
                            <div class="layui-input-block">
                                <input type="text" name="cos[secretID]" value="{$value.cos.secretID|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type2">
                            <label class="layui-form-label">腾讯云SecretKey</label>
                            <div class="layui-input-block">
                                <input type="text" name="cos[secretKey]" value="{$value.cos.secretKey|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type2">
                            <label class="layui-form-label">存储区域</label>
                            <div class="layui-input-block">
                                <input type="text" name="cos[region]" value="{$value.cos.region|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type2">
                            <label class="layui-form-label">源站类型</label>
                            <div class="layui-input-block">
                                <input type="text" name="cos[schema]" value="{$value.cos.schema|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type2">
                            <label class="layui-form-label">Bucket(存储桶名称)</label>
                            <div class="layui-input-block">
                                <input type="text" name="cos[bucket]" value="{$value.cos.bucket|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type2">
                            <label class="layui-form-label">Bucket域名(外网)</label>
                            <div class="layui-input-block">
                                <input type="text" name="cos[bucket_url]" value="{$value.cos.bucket_url|default=''}"
                                       class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item type3">
                            <label class="layui-form-label">Access Key ID</label>
                            <div class="layui-input-block">
                                <input type="text" name="bos[accessKeyId]" value="{$value.bos.accessKeyId|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type3">
                            <label class="layui-form-label">Access Key Secret</label>
                            <div class="layui-input-block">
                                <input type="text" name="bos[accessKeySecret]"
                                       value="{$value.bos.accessKeySecret|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type3">
                            <label class="layui-form-label">EndPoint(外网)</label>
                            <div class="layui-input-block">
                                <input type="text" name="bos[endpoint]" value="{$value.bos.endpoint|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type3">
                            <label class="layui-form-label">Bucket(存储桶名称)</label>
                            <div class="layui-input-block">
                                <input type="text" name="bos[bucket]" value="{$value.bos.bucket|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type3">
                            <label class="layui-form-label">Bucket域名(外网)</label>
                            <div class="layui-input-block">
                                <input type="text" name="bos[bucket_url]" value="{$value.bos.bucket_url|default=''}"
                                       class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item type4">
                            <label class="layui-form-label">七牛ACCESS_KEY</label>
                            <div class="layui-input-block">
                                <input type="text" name="kodo[accessKey]" value="{$value.kodo.accessKey|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type4">
                            <label class="layui-form-label">七牛SECRET_KEY</label>
                            <div class="layui-input-block">
                                <input type="text" name="kodo[secretKey]" value="{$value.kodo.secretKey|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type4">
                            <label class="layui-form-label">Bucket(存储桶名称)</label>
                            <div class="layui-input-block">
                                <input type="text" name="kodo[bucket]" value="{$value.kodo.bucket|default=''}"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item type4">
                            <label class="layui-form-label">Bucket域名(外网)</label>
                            <div class="layui-input-block">
                                <input type="text" name="kodo[bucket_url]" value="{$value.kodo.bucket_url|default=''}"
                                       class="layui-input">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input type="hidden" name="id" value="{$key}">
                                <button class="layui-btn" lay-submit lay-filter="set_system">确认保存</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<style>
    .type2, .type3, .type4 {
        display: none
    }
</style>
{/block}
{block name="module"}'set'{/block}
